package ui.frame;

import ui.model.LogModel;

import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;

public class HBasePro extends JFrame {
    private Map<String,JPanel> panelMap = new HashMap<>();
    private JTabbedPane jTabbedPane = new JTabbedPane(JTabbedPane.TOP);
    public HBasePro()
    {
        setTitle("HBaseFrame");
        setBounds(400, 400, 1200, 800);
        setLayout(new BorderLayout(2,2));
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
        Container contentPane = this.getContentPane();
        contentPane.add(new LogModel(),"South");
        contentPane.add(jTabbedPane);
    }
    public void AddPanel(String label,JPanel jPanel)
    {
        panelMap.put(label,jPanel);
        jTabbedPane.add(jPanel,label);
        revalidate();

    }

    public void AddMenu(JMenuBar jMenuBar)
    {
        this.setJMenuBar(jMenuBar);
        revalidate();
    }

}
